package com.locatead.test.dao;

import javax.jdo.PersistenceManager;

import org.springframework.stereotype.Component;

import com.locatead.test.model.SimpleModel;
import com.locatead.test.util.PMF;

@Component
public class SimpleDAOImpl implements SimpleDAO {

	public void createSimpleModel(SimpleModel s) {
		
		PersistenceManager pm = null;
		try {
			pm = PMF.get().getPersistenceManager();
			
			if (s != null) {
				pm.makePersistent(s);
			}
		} finally {
			pm.close();
		}
	}

}
